package com.orhon.smartcampus.modules.student.inputMapper;


import java.util.Map;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import com.alibaba.fastjson.JSON;
import com.orhon.smartcampus.modules.student.gqlInputModel.GQLOperatingInput;

@Mapper
public interface OperatingInputMapper {


    OperatingInputMapper MAPPER = Mappers.getMapper(OperatingInputMapper.class);

    default GQLOperatingInput mapInput(Map map){
        String json = JSON.toJSONString(map);
        GQLOperatingInput input = JSON.parseObject(json , GQLOperatingInput.class);
        return input;
    }


}
